home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 20 code / Scripting the Finder / Zawphing / DialogUtilities.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-11  |  3.1 KB  |  80 lines  |  [TEXT/MMCC]

  1. /*================================================================================
  2.     dialogUtilities.h
  3.     
  4.     circa 1991 by Greg Anderson
  5.     greggor@apple.com
  6.     
  7.     This file contains various dialog box utility routines
  8. ================================================================================*/
  9. #ifndef __DIALOGUTILITIES__
  10. #define __DIALOGUTILITIES__
  11.  
  12. #ifndef __TYPES__
  13. #include <Types.h>
  14. #endif
  15. #ifndef __DIALOGS__
  16. #include <Dialogs.h>
  17. #endif
  18.  
  19. //
  20. // This is the structure of an item in a dialog item list.
  21. // See IM I-427 for an explanation of the complete format
  22. // of a DITL
  23. //
  24. #if defined(powerc) || defined (__powerc)
  25. #pragma options align=mac68k
  26. #endif
  27. typedef struct
  28. {
  29.     long            placeholder;
  30.     Rect            location;
  31.     unsigned char    itemType;
  32.     unsigned char    extraLength;
  33. } DITLitem;
  34. #if defined(powerc) || defined(__powerc)
  35. #pragma options align=reset
  36. #endif
  37.  
  38. extern RoutineDescriptor gCutPasteFilterRD;
  39.  
  40. //
  41. // Prototypes for dialogUtilities.c
  42. //
  43. void                SimpleBox(short id);
  44. void                MessageBox(short id, Str255 pstr);
  45. void                GiveUserAChanceToCancel( Str255 pstr );
  46. void                CenterDialog(DialogPtr dlog, short dx = 0, short dy = 0);
  47. void                CenterAndShowDialog(DialogPtr dlog);
  48. short                AddNewUserItem( DialogPtr dlog );
  49. pascal void            DrawDottedLineProc(DialogPtr dlog, short item);
  50. void                SetUserItemToDottedLine( DialogPtr dlog, short whichItem );
  51. pascal void            DrawFrameRectProc(DialogPtr dlog, short item);
  52. void                SetUserItemToFrameRect( DialogPtr dlog, short whichItem );
  53. pascal void            DrawDefaultProc(DialogPtr dlog, short item);
  54. short                InstallDefaultOutline(DialogPtr dlog, short button);
  55. pascal void            DrawActiveItemProc(DialogPtr dlog, short item);
  56. short                InstallActiveItemOutline(DialogPtr dlog, short button);
  57. pascal void            DrawGreyTransformProc(DialogPtr dlog, short item);
  58. short                InstallGreyTransform(DialogPtr dlog, short button);
  59. void                MoveOutline(DialogPtr dlog, short userItem, short button);
  60. void                MoveActiveIndicator(DialogPtr dlog, short userItem, short button);
  61. void                MoveDItem( DialogPtr dlog, short itemNumber, short h, short v );
  62. void                SetItemHandle( DialogPtr dlog, short whichItem, Handle newItem );
  63. Point                GetItemPoint( DialogPtr dlog, short itemNum );
  64. Boolean                DialogItemEnabled(DialogPtr dlog, short item);
  65. void                SetDialogItemDisableBit(DialogPtr dlog, short item, Boolean enable);
  66. void                EnableButton(DialogPtr dlog, short button,Boolean enable);
  67. Boolean                EnabledTEItemsExist(DialogPtr dlog);
  68. short                FindNextEnabledTEItem(DialogPtr dlog, short item);
  69. void                TabToNextEnabledTEItem(DialogPtr dlog);
  70. void                EnableTEItem(DialogPtr dlog, short item, Boolean enable);
  71. Boolean                GetCheckboxState(DialogPtr dlog, short checkbox);
  72. void                SetCheckboxState(DialogPtr dlog, short checkbox, Boolean check);
  73. void                ToggleCheckboxState(DialogPtr dlog, short checkbox);
  74. short                GetSelectedRadioButton(DialogPtr dlog, short firstRadio, short lastRadio);
  75. void                SetSelectedRadioButton(DialogPtr dlog, short selectRadio, short firstRadio, short lastRadio);
  76. void                FlashDlogItem( DialogPtr dlog, short itemNum );
  77. pascal Boolean        CutPasteFilter( DialogPtr dlog, EventRecord* event, short* item );
  78.  
  79. #endif
  80.